<template>
  <view >
    <!-- #ifdef MP-WEIXIN   -->
    <weChatMap v-model="postionWeChat" :postion="demo2"/>
    <view>{{ postionWeChat }}</view>
    <!-- #endif -->
    <!-- #ifdef H5 -->
    <h5Map v-model="postionh5" :points="demo" :center-points="demo3" />
    <view>{{ postionh5 }}</view>
    <!-- #endif -->

  </view>
</template>

<script>

import weChatMap from '@/components/Map/weChatDotMap'

import h5Map from '@/components/Map/h5DotMap.vue'

export default {
  components: {
    weChatMap, h5Map
  },
  data() {
    return {
      demo: { lat: 39.91555348279525, lng: 116.41801356595558 },
      demo3: { lat: 39.91555348279525, lng: 116.41801356595558 },
      demo2: { latitude: 39.91555348279525, longitude: 116.41801356595558 },
      postionh5: [],
      postionWeChat: []
    }
  },
  watch: {
    demo: {
      immediate: true,
      handler(val) {
        console.log('demo', val)
      }
    },
    postionWeChat: {
      immediate: true,
      handler(val) {
        console.log(val, 'father')
      }
    }
  }
}
</script>
